Public Member Functions | Protected Member Functions | Protected Attributes

vfsStreamFile Class Reference

Inheritance diagram for vfsStreamFile:
vfsStreamAbstractContent vfsStreamContent

Public Member Functions

 __construct ($name, $permissions=null)
 appliesTo ($name)
 setContent ($content)
 withContent ($content)
 getContent ()
 read ($count)
 readUntilEnd ()
 write ($data)
 eof ()
 getBytesRead ()
 seek ($offset, $whence)
 size ()

Protected Member Functions

 getDefaultPermissions ()

Protected Attributes

 $content
 $bytes_read = 0

Constructor & Destructor Documentation

__construct ( name,
permissions = null 
)

constructor

Parameters:
string$name
int$permissionsoptional

Reimplemented from vfsStreamAbstractContent.


Member Function Documentation

appliesTo ( name )

checks whether the container can be applied to given name

Parameters:
string$name
Returns:
bool

Reimplemented from vfsStreamAbstractContent.

eof (  )

checks whether pointer is at end of file

Returns:
bool
getBytesRead (  )

returns the current position within the file

Returns:
int
getContent (  )

returns the contents of the file

Returns:
string
getDefaultPermissions (  ) [protected]

returns default permissions for concrete implementation

Returns:
int
Since:
0.8.0

Reimplemented from vfsStreamAbstractContent.

read ( count )

reads the given amount of bytes from content

Parameters:
int$count
Returns:
string
readUntilEnd (  )

returns the content until its end from current offset

Returns:
string
seek ( offset,
whence 
)

seeks to the given offset

Parameters:
int$offset
int$whence
Returns:
bool
setContent ( content )

alias for withContent()

Parameters:
string$content
Returns:
vfsStreamFile
See also:
withContent()
size (  )

returns size of content

Returns:
int

Implements vfsStreamContent.

withContent ( content )

sets the contents of the file

Setting content with this method does not change the time when the file was last modified.

Parameters:
string$content
Returns:
vfsStreamFile
See also:
setContent()
write ( data )

writes an amount of data

Using this method changes the time when the file was last modified.

Parameters:
string$data
Returns:
amount of written bytes

The documentation for this class was generated from the following file: